﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace HardwareAs
{

    public partial class FAQ : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            Label2.Text = "";
            SqlRequest init =new SqlRequest();

            Repeater1.DataSource = init.getAllFAQ();
            Repeater1.DataBind();
        }

        protected void submitBtn_Click(object sender, EventArgs e)
        {
            Label2.Text = "";
            Repeater1.DataSource = null;
            Repeater1.DataBind();
            SqlRequest sq = new SqlRequest();
            SqlDataReader sb= sq.myFAQ(TextBox1.Text);
            if (sb.HasRows)
            {
                Repeater1.DataSource = sb;
                Repeater1.DataBind();
                return;
            }

            Label2.Text = "No Result";

        }
    }
}